<template>
  <div class="template-wrap">
    <menu-top></menu-top>
    <div class="content">
      <div class="content-wrap">
        <div>
          <menu-left ref="left" :href="href"></menu-left>
        </div>
        <el-col>
          <div class="financial-wrap right-content">
            <el-breadcrumb v-if="!id" separator-class="el-icon-arrow-right">
              <el-breadcrumb-item :to="{ path: '/companyEdit' }">我的公司</el-breadcrumb-item>
              <el-breadcrumb-item>财务信息</el-breadcrumb-item>
            </el-breadcrumb>
            <el-breadcrumb v-if="id" separator-class="el-icon-arrow-right">
              <el-breadcrumb-item :to="{ path: '/bankBankOrderHand' }">我的订单</el-breadcrumb-item>
              <el-breadcrumb-item>财务信息</el-breadcrumb-item>
            </el-breadcrumb>
            <div class="wrap">
              <rotate-message></rotate-message>
              <div class="wrap-container">
                <div class="title">财务信息
                    <div  v-if="!id" @click="addFinance" class="btn">添加财务信息</div>
                </div>
                <div class="table-wrap" :class="editState?'edit':''">
                    <div class="table-year">
                        <div class="table-title">年度</div>
                        <div class="table-item">
                            <div class="table-list" :class="index == yearIndex?'active':''" @click="yearSelect(index)" v-for="(item,index) in yearArr" :key="index">{{item.rtpYear}}</div>
                        </div>
                    </div>
                    <div class="table-month">
                        <div class="table-title">季度</div>
                        <div class="table-item">
                            <template v-if="yearArr&&yearArr.length">
                                 <div  @click="regClick(index,item.id)" v-for="(item,index) in yearArr[yearIndex].financeDatas" :class="index == rptIndex?'active':''" :key="index" class="table-list">{{retunStr(item.rptQuarter)}}</div>
                            </template>
                           
                        </div>
                    </div>
                    <div class="table-detail">
                        <div class="table-title">
                            <div class="tab-item">
                                <div v-for="(item,index) in typeArr" @click="typeBtn(index)" :class="tableType == index+1?'active':''" :key="index" class="tab-list">{{item.value}}</div>
                            </div>
                            <div class="date"><span>报告时间：</span>{{projectDate}}</div>
                            <div class="state"><span>审核状态：</span>{{statusDesc}}</div>
                            <!-- <div class="change">修改</div> -->
                        </div>
                        <div v-if="!id" class="table-file">
                            <div class="name">上传资产负债表文件：</div>
                           <el-upload
                            class="upload-demo"
                            :action="upLoadUrl"
                            :on-remove="handleRemove"
                            :show-file-list="false"
                            :on-success="handleFileSuccess">
                                <div class="btn">上传</div>
                            </el-upload>
                            <div class="file-name">{{fileName}}</div>
                        </div>
                        <div v-show="tableType == 1" class="table-menu">
                            <div class="menu-title">资产负债表</div>
                            <div v-if="!editState&&!id"  @click="editBtn" class="btn">编辑</div>
                            <el-form :model="information" :rules="rules" ref="information" >
                                <div class="name-title">一、资产总计</div>
                                <el-form-item prop="currentAssets">
                                    <div class="desc">
                                        <span>流动资产合计：</span>
                                        <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.currentAssets:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information.currentAssets" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="bankCash">
                                    <div class="desc">
                                        <span>货币资金：</span>
                                        <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.bankCash:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information.bankCash" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="currentInvestment">
                                    <div class="desc">
                                        <span>短期投资：</span>
                                        <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.currentInvestment:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information.currentInvestment" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="notesReceivable">
                                    <div class="desc">
                                        <span>应收票据：</span>
                                        <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.notesReceivable:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information.notesReceivable" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="accountReceivable">
                                    <div class="desc">
                                        <span>应收账款：</span>
                                        <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.accountReceivable:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information.accountReceivable" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="otherReceivable">
                                    <div class="desc">
                                        <span>其它应收款：</span>
                                        <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.otherReceivable:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information.otherReceivable" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="prepayment">
                                    <div class="desc">
                                        <span>预付款项：</span>
                                        <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.prepayment:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information.prepayment" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="inventory">
                                    <div class="desc">
                                        <span>存货：</span>
                                        <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.inventory:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information.inventory" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="otherAssets">
                                    <div class="desc">
                                        <span>其它资产合计：</span>
                                        <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.otherAssets:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information.otherAssets" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="longtermInvestment">
                                    <div class="desc">
                                        <span>长期投资：</span>
                                        <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.longtermInvestment :''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model.number="information.longtermInvestment" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="netBal">
                                    <div class="desc">
                                        <span>固定资产净值：</span>
                                        <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.netBal:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model.number="information.netBal" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="constructionInprogress">
                                    <div class="desc">
                                        <span>在建工程：</span>
                                        <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.constructionInprogress :''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model.number="information.constructionInprogress" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="intangibleAssets">
                                    <div class="desc">
                                        <span>无形资产：</span>
                                        <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.intangibleAssets:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information.intangibleAssets" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="longtermDeferredExpense">
                                    <div class="desc">
                                        <span>长期待摊费用：</span>
                                        <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.longtermDeferredExpense:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information.longtermDeferredExpense" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <div class="name-title">二、负债总额</div>
                                <div class="second">
                                    <el-form-item prop="totalCurrentLiability">
                                            <div class="desc num">
                                                <span>1、流动负债合计：</span>
                                                <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.totalCurrentLiability:''}}</div>
                                                <div v-show="editState" class="tip"><el-input v-model="information.totalCurrentLiability" placeholder="请输入内容"></el-input></div>
                                            </div>
                                    </el-form-item>
                                    <el-form-item prop="shorttermLoans">
                                            <div class="desc">
                                                <span>短期借款：</span>
                                                <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.shorttermLoans:''}}</div>
                                                <div v-show="editState" class="tip"><el-input v-model="information.shorttermLoans" placeholder="请输入内容"></el-input></div>
                                            </div>
                                    </el-form-item>
                                    <el-form-item prop="notesPayable">
                                            <div class="desc">
                                                <span>应付票据：</span>
                                                <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.notesPayable:''}}</div>
                                                <div v-show="editState" class="tip"><el-input v-model="information.notesPayable" placeholder="请输入内容"></el-input></div>
                                            </div>
                                    </el-form-item>
                                    <el-form-item prop="advanceFromCustomers">
                                            <div class="desc">
                                                <span>预收账款：</span>
                                                <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.advanceFromCustomers:''}}</div>
                                                <div v-show="editState" class="tip"><el-input v-model="information.advanceFromCustomers" placeholder="请输入内容"></el-input></div>
                                            </div>
                                    </el-form-item>
                                    <el-form-item prop="accountsPayable">
                                            <div class="desc">
                                                <span>应付账款：</span>
                                                <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.accountsPayable:''}}</div>
                                                <div v-show="editState" class="tip"><el-input v-model="information.accountsPayable" placeholder="请输入内容"></el-input></div>
                                            </div>
                                    </el-form-item>
                                    <el-form-item prop="taxesPayable">
                                            <div class="desc">
                                                <span>应交税金：</span>
                                                <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.taxesPayable :''}}</div>
                                                <div v-show="editState" class="tip"><el-input v-model="information.taxesPayable" placeholder="请输入内容"></el-input></div>
                                            </div>
                                    </el-form-item>
                                    <el-form-item prop="otherPayable">
                                            <div class="desc">
                                                <span>其它应付款：</span>
                                                <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.otherPayable :''}}</div>
                                                <div v-show="editState" class="tip"><el-input v-model="information.otherPayable" placeholder="请输入内容"></el-input></div>
                                            </div>
                                    </el-form-item>
                                    <el-form-item prop="otherCurrentLiability">
                                            <div class="desc">
                                                <span>其它流动负债(未付利润)：</span>
                                                <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.otherCurrentLiability :''}}</div>
                                                <div v-show="editState" class="tip"><el-input v-model="information.otherCurrentLiability" placeholder="请输入内容"></el-input></div>
                                            </div>
                                    </el-form-item>
                                    <el-form-item prop="totalLongtermLiability">
                                            <div class="desc num">
                                                <span>2、长期负债合计：</span>
                                                <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.totalLongtermLiability:''}}</div>
                                                <div v-show="editState" class="tip"><el-input v-model="information.totalLongtermLiability" placeholder="请输入内容"></el-input></div>
                                            </div>
                                    </el-form-item>
                                    <el-form-item prop="longtermLoans">
                                            <div class="desc">
                                                <span>长期借款：</span>
                                                <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.longtermLoans :''}}</div>
                                                <div v-show="editState" class="tip"><el-input v-model="information.longtermLoans" placeholder="请输入内容"></el-input></div>
                                            </div>
                                    </el-form-item>
                                </div>
                                <div class="name-title">三、所有者权益</div>
                                <div class="second">
                                    <el-form-item prop="netBa">
                                            <div class="desc num">
                                                <span>1、实收资本：</span>
                                                <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.netBa:''}}</div>
                                                <div v-show="editState" class="tip"><el-input v-model="information.netBa" placeholder="请输入内容"></el-input></div>
                                            </div>
                                    </el-form-item>
                                    <el-form-item prop="capitalReserves">
                                            <div class="desc">
                                                <span>资本公积：</span>
                                                <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.capitalReserves :''}}</div>
                                                <div v-show="editState" class="tip"><el-input v-model="information.capitalReserves" placeholder="请输入内容"></el-input></div>
                                            </div>
                                    </el-form-item>
                                    <el-form-item prop="surplusReserves">
                                            <div class="desc">
                                                <span>盈余公积：</span>
                                                <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.surplusReserves :''}}</div>
                                                <div v-show="editState" class="tip"><el-input v-model="information.surplusReserves" placeholder="请输入内容"></el-input></div>
                                            </div>
                                    </el-form-item>
                                    <el-form-item prop="retainedProfits">
                                            <div class="desc num">
                                                <span>2、未分配利润：</span>
                                                <div v-show="!editState" class="tip">{{info.balanceSheetData?info.balanceSheetData.retainedProfits:''}}</div>
                                                <div v-show="editState" class="tip"><el-input v-model="information.retainedProfits" placeholder="请输入内容"></el-input></div>
                                            </div>
                                    </el-form-item>
                                </div>
                                 <el-form-item>
                                        <el-button v-if="editState" type="primary" @click="confrimBtn1('information')">确 定</el-button> 
                                 </el-form-item>
                            </el-form>
                            
                        </div>
                        <div v-show="tableType == 2" class="table-menu">
                            <div class="menu-title">利润表</div>
                            <div v-if="!editState&&!id" @click="editBtn" class="btn">编辑</div>
                            <el-form :model="information1" :rules="rules2" ref="information1" >
                                <div class="name-title">一、主营收入</div>
                                <el-form-item prop="revenue">
                                    <div class="desc">
                                        <span>主营收入：</span>
                                        <div v-show="!editState" class="tip">{{info.profitSheetData?info.profitSheetData.revenue:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information1.revenue" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                 <div class="name-title">二、主营成本</div>
                                <el-form-item prop="salesCost">
                                    <div class="desc">
                                        <span>主营成本：</span>
                                        <div v-show="!editState" class="tip">{{info.profitSheetData?info.profitSheetData.salesCost:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information1.salesCost" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <div class="name-title">三、毛利</div>
                                <el-form-item prop="grossProfit">
                                    <div class="desc">
                                        <span>毛利：</span>
                                        <div v-show="!editState" class="tip">{{info.profitSheetData?info.profitSheetData.grossProfit :''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information1.grossProfit " placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="otherProfit">
                                    <div class="desc">
                                        <span>其他业务利润：</span>
                                        <div v-show="!editState" class="tip">{{info.profitSheetData?info.profitSheetData.otherProfit :''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information1.otherProfit " placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="operatingExpense">
                                    <div class="desc">
                                        <span>经营费用：</span>
                                        <div v-show="!editState" class="tip">{{info.profitSheetData?info.profitSheetData.operatingExpense :''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information1.operatingExpense " placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="adminExpense">
                                    <div class="desc">
                                        <span>管理费用：</span>
                                        <div v-show="!editState" class="tip">{{info.profitSheetData?info.profitSheetData.adminExpense :''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information1.adminExpense " placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="financeExpense">
                                    <div class="desc">
                                        <span>财务费用：</span>
                                        <div v-show="!editState" class="tip">{{info.profitSheetData?info.profitSheetData.financeExpense:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information1.financeExpense " placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="interestExpense">
                                    <div class="desc">
                                        <span>其中：利息支出：</span>
                                        <div v-show="!editState" class="tip">{{info.profitSheetData?info.profitSheetData.interestExpense:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information1.interestExpense" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="investmentIncome">
                                    <div class="desc">
                                        <span>投资收益：</span>
                                        <div v-show="!editState" class="tip">{{info.profitSheetData?info.profitSheetData.investmentIncome:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information1.investmentIncome" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                 <div class="name-title">四、营业利润</div>
                                <el-form-item prop="operationProfit">
                                    <div class="desc">
                                        <span>营业利润：</span>
                                        <div v-show="!editState" class="tip">{{info.profitSheetData?info.profitSheetData.operationProfit :''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information1.operationProfit " placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="nonOperationIncome">
                                    <div class="desc">
                                        <span>营业外收入：</span>
                                        <div v-show="!editState" class="tip">{{info.profitSheetData?info.profitSheetData.nonOperationIncome:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information1.nonOperationIncome" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="nonOperationExpense">
                                    <div class="desc">
                                        <span>营业外支出：</span>
                                        <div v-show="!editState" class="tip">{{info.profitSheetData?info.profitSheetData.nonOperationExpense:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information1.nonOperationExpense" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <div class="name-title">五、利润总额</div>
                                <el-form-item prop="beforeTaxProfit">
                                    <div class="desc">
                                        <span>利润总额：</span>
                                        <div v-show="!editState" class="tip">{{info.profitSheetData?info.profitSheetData.beforeTaxProfit:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information1.beforeTaxProfit" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <div class="name-title">六、净利润</div>
                                <el-form-item prop="netProfit">
                                    <div class="desc">
                                        <span>净利润：</span>
                                        <div v-show="!editState" class="tip">{{info.profitSheetData?info.profitSheetData.netProfit :''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information1.netProfit" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                 <el-form-item>
                                        <el-button v-if="editState" type="primary" @click="confrimBtn2('information1')">确 定</el-button> 
                                 </el-form-item>
                            </el-form>
                            
                        </div>
                        <div v-show="tableType == 3" class="table-menu">
                            <div class="menu-title">现金流量表</div>
                            <div v-if="!editState&&!id" @click="editBtn" class="btn">编辑</div>
                            <el-form :model="information2" :rules="rules3" ref="information2" >
                                <div class="name-title">一、经营活动产生的现金流量</div>
                                <el-form-item prop="runInflowsCash">
                                    <div class="desc">
                                        <span>经营活动现金流入：</span>
                                        <div v-show="!editState" class="tip">{{info.cashflowData?info.cashflowData.runInflowsCash:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information2.runInflowsCash" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item> 
                                <el-form-item prop="runOutflowsCash">
                                    <div class="desc">
                                        <span>经营活动现金流出：</span>
                                        <div v-show="!editState" class="tip">{{info.cashflowData?info.cashflowData.runOutflowsCash:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information2.runOutflowsCash" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="runNetFlows">
                                    <div class="desc">
                                        <span>经营活动产生的现金流量净额：</span>
                                        <div v-show="!editState" class="tip">{{info.cashflowData?info.cashflowData.runNetFlows:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information2.runNetFlows" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                 <div class="name-title">二、投资活动产生的现金流量 </div>
                                <el-form-item prop="investInflowsCash"> 
                                    <div class="desc">
                                        <span>投资活动现金流入 ：</span>
                                        <div v-show="!editState" class="tip">{{info.cashflowData?info.cashflowData.investInflowsCash:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information2.investInflowsCash" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="investOutflowsCash"> 
                                    <div class="desc">
                                        <span>投资活动现金流出 ：</span>
                                        <div v-show="!editState" class="tip">{{info.cashflowData?info.cashflowData.investOutflowsCash:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information2.investOutflowsCash" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="investNetFlows"> 
                                    <div class="desc">
                                        <span>投资活动产生的现金流量净额 ：</span>
                                        <div v-show="!editState" class="tip">{{info.cashflowData?info.cashflowData.investNetFlows:''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information2.investNetFlows" placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <div class="name-title">三、筹资活动产生的现金流量</div>
                                <el-form-item prop="financingInflowsCash">
                                    <div class="desc">
                                        <span>筹资活动现金流入：</span>
                                        <div v-show="!editState" class="tip">{{info.cashflowData?info.cashflowData.financingInflowsCash :''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information2.financingInflowsCash " placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="financingOutflowsCash">
                                    <div class="desc">
                                        <span>筹资活动现金流出：</span>
                                        <div v-show="!editState" class="tip">{{info.cashflowData?info.cashflowData.financingOutflowsCash :''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information2.financingOutflowsCash " placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                <el-form-item prop="financingNetFlows">
                                    <div class="desc">
                                        <span>筹资活动产生的现金流量净额：</span>
                                        <div v-show="!editState" class="tip">{{info.cashflowData?info.cashflowData.financingNetFlows :''}}</div>
                                        <div v-show="editState" class="tip"><el-input v-model="information2.financingNetFlows " placeholder="请输入内容"></el-input></div>
                                    </div>
                                </el-form-item>
                                 <div class="name-title">四、现金净流量合计</div>
                                <el-form-item prop="operationProfit">
                                    <div class="desc">
                                        <span>现金净流量合计：</span>
                                        <div class="tip">{{info.cashflowData?(info.cashflowData.financingNetFlows?info.cashflowData.financingNetFlows:0)+(info.cashflowData.investNetFlows?info.cashflowData.investNetFlows:0)+(info.cashflowData.runNetFlows?info.cashflowData.runNetFlows:0) :''}}</div>
                                    </div>
                                </el-form-item>
                                 <el-form-item style="margin-top:20px">
                                        <el-button v-if="editState" type="primary" @click="confrimBtn3('information2')">确 定</el-button> 
                                 </el-form-item>
                            </el-form>
                            
                        </div>
                    </div>
                </div>
              </div>
            </div>
            <el-dialog title="添加财务报表" :visible.sync="dialogFormVisible">
                <el-form :model="form" :rules="rules1" ref="form">
                    <el-form-item  prop="rptYear" label="选择年份" :label-width="formLabelWidth">
                        <el-date-picker
                        v-model="form.rptYear"
                        type="year"
                        value-format="yyyy"
                        placeholder="选择年">
                        </el-date-picker>
                    </el-form-item>
                    <el-form-item prop="rptQuarter" label="选择季度" :label-width="formLabelWidth">
                       <el-select  v-model="form.rptQuarter">
                            <el-option
                            v-for="item in rpyArr"
                            :key="item.key"
                            :label="item.value"
                            :value="item.key">
                            </el-option>
                        </el-select>
                    </el-form-item>
                    <el-form-item  prop="excelFileId" label="上传资产负债表文件：" :label-width="formLabelWidth">
                       <el-upload
                        class="upload-demo"
                        :action="upLoadUrl"
                        :on-remove="handleRemove"
                        :limit="1"
                        :on-success="handleFileSuccess"
                        :file-list="fileList">
                            <div class="btn">上传</div>
                        </el-upload>
                    </el-form-item>
                </el-form>
                <div slot="footer" class="dialog-footer">
                    <el-button @click="dialogFormVisible = false">取 消</el-button>
                    <el-button type="primary" @click="confrimBtn('form')">确 定</el-button>
                </div>
             </el-dialog>
          </div>
        </el-col>
      </div>
    </div>
  </div>
</template>

<script>
let CONSTANT = require('../../../constant/constant.js'),
    common = require('../../../common.js');
import VueRouter from 'vue-router'
export default {
  name: 'menulist',
  data(){
    var validateNum =  (rule, value, callback) => { 
        if (isNaN(value)){ return callback(new Error('请输入数字')); }
        var reg= /^(-?\d+)(\.\d{1,2})?$/
        if (!reg.test(value)){ return callback(new Error('请保留两位小数')); }
        callback();
    };
    return{
      href:'',
      checkList:'是',
      dialogFormVisible:false,
      formLabelWidth:'120',
      upLoadUrl:'',
      tableType:1,
      form:{
        excelFileId: '',
        rptQuarter: '',     
        rptYear: '' 
      },
      fileName:'',
      yearArr:[],
      projectDate:'',
      rpyArr:[
          {
              key:'1',
              value:'第一季度'
          },
          {
              key:'2',
              value:'第二季度'
          },
          {
              key:'3',
              value:'第三季度'
          },
          {
              key:'4',
              value:'第四季度'
          }
      ],
      rules1:{
          rptYear:[
            {required: true, message: '请选择年份', trigger: 'change'  }
          ],
          rptQuarter:[
            {required: true, message: '请选择融资轮次', trigger: 'change'  }
          ]
      },
      id:'',
      info:{},
      editState:false,
      yearIndex:0,
      rptIndex:0,
      financeId:'',
      typeSelect:0,
      fileList:[],
      typeArr:[
          {key:'0',value:'资产负债表'},
          {key:'1',value:'利润表'},
          {key:'2',value:'现金流量表'}
      ],
      information:{
          financeId:'',
          currentAssets:'',
          bankCash:'',
          currentInvestment:'',
          notesReceivable:'',
          accountReceivable:'',
          otherReceivable:'',
          prepayment:'',
          inventory:'',
          otherAssets:'',
          longtermInvestment:'',
          netBal:'',
          constructionInprogress:'',
          intangibleAssets:'',
          longtermDeferredExpense:'',
          totalCurrentLiability:'',
          shorttermLoans:'',
          notesPayable:'',
          advanceFromCustomers:'',
          accountsPayable:'',
          taxesPayable:'',
          otherPayable:'',
          otherCurrentLiability:'',
          totalLongtermLiability:'',
          longtermLoans:"",
          netBa:'',
          capitalReserves:'',
          surplusReserves:'',
          retainedProfits:''
      },
      rules:{
        currentAssets:[
            {required: true, message: '请输入流动资产合计', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        bankCash:[
            {required: true, message: '请输入货币资金', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        currentInvestment:[
            {required: true, message: '请输入短期投资', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        notesReceivable:[
            {required: true, message: '请输入应收票据', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        accountReceivable:[
            {required: true, message: '请输入应收账款', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        otherReceivable:[
            {required: true, message: '请输入其它应收款', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        prepayment:[
            {required: true, message: '请输入预付款项', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        inventory:[
            {required: true, message: '请输入存货', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        otherAssets:[
            {required: true, message: '请输入其它资产合计', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        longtermInvestment:[
            {required: true, message: '请输入长期投资', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        netBal:[
            {required: true, message: '请输入固定资产净值', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ], 
        constructionInprogress:[
            {required: true, message: '请输入在建工程', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        intangibleAssets:[
            {required: true, message: '请输入无形资产', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        longtermDeferredExpense:[
            {required: true, message: '请输入长期待摊费用', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        totalCurrentLiability:[
            {required: true, message: '请输入流动负债合计', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        shorttermLoans:[
            {required: true, message: '请输入短期借款', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        notesPayable:[
            {required: true, message: '请输入应付票据', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        advanceFromCustomers:[
            {required: true, message: '请输入预收账款', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        advanceFromCustomers:[
            {required: true, message: '请输入预收账款', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        accountsPayable:[
            {required: true, message: '请输入应付账款', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        taxesPayable:[
            {required: true, message: '请输入应交税金', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ], 
        otherPayable:[
            {required: true, message: '请输入其它应付款', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        otherCurrentLiability:[
            {required: true, message: '请输入其它流动负债', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        totalLongtermLiability:[
            {required: true, message: '请输入长期负债合计', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        longtermLoans:[
            {required: true, message: '请输入长期借款', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        netBa:[
            {required: true, message: '请输入实收资本', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        capitalReserves:[
            {required: true, message: '请输入资本公积', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        surplusReserves:[
            {required: true, message: '请输入盈余公积', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        retainedProfits:[
            {required: true, message: '请输入未分配利润', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
      },
      information1:{
          revenue:'',
          salesCost :'',
          grossProfit:'',
          otherProfit:'',
          operatingExpense:'',
          adminExpense:'',
          financeExpense:'',
          interestExpense:'',
          investmentIncome:'',
          operationProfit:'',
          nonOperationIncome:'',
          nonOperationExpense:'',
          beforeTaxProfit:'',
          netProfit:''
      },
      rules2:{
        revenue:[
            {required: true, message: '请输入主营收入', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ], 
        salesCost:[
            {required: true, message: '请输入主营成本', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ], 
        grossProfit:[
            {required: true, message: '请输入毛利', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ], 
        otherProfit:[
            {required: true, message: '请输入其他业务利润', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ], 
        operatingExpense:[
            {required: true, message: '请输入经营费用', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ], 
        adminExpense:[
            {required: true, message: '请输入管理费用', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ], 
        financeExpense:[
            {required: true, message: '请输入财务费用', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ], 
        financeExpense:[
            {required: true, message: '请输入财务费用', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ], 
        interestExpense:[
            {required: true, message: '请输入利息支出', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ], 
        investmentIncome:[
            {required: true, message: '请输入投资收益', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ], 
        operationProfit:[
            {required: true, message: '请输入营业利润', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ], 
        operationProfit:[
            {required: true, message: '请输入营业利润', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ], 
        nonOperationIncome:[
            {required: true, message: '请输入营业外收入', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        nonOperationExpense:[
            {required: true, message: '请输入营业外支出', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        beforeTaxProfit:[
            {required: true, message: '请输入利润总额', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        netProfit:[
            {required: true, message: '请输入净利润', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
      },
      information2:{
        financingInflowsCash: '',
        financingNetFlows:'',
        financingOutflowsCash: '',
        investInflowsCash: '',
        investNetFlows: '',
        investOutflowsCash:'',
        runInflowsCash: '',
        runNetFlows: '',
        runOutflowsCash: ''
      },
      rules3:{
        financingInflowsCash:[
            {required: true, message: '请输入筹资活动现金流入', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        financingNetFlows:[
            {required: true, message: '请输入筹资活动产生的现金流量净额', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        financingOutflowsCash:[
            {required: true, message: '请输入筹资活动现金流出', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        investInflowsCash:[
            {required: true, message: '请输入投资活动现金流入', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        investNetFlows:[
            {required: true, message: '请输入投资活动产生的现金流量净额', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        investOutflowsCash:[
            {required: true, message: '请输入投资活动现金流出', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        runInflowsCash:[
            {required: true, message: '请输入经营活动现金流入', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        runNetFlows:[
            {required: true, message: '请输入经营活动产生的现金流量净额', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
        runOutflowsCash:[
            {required: true, message: '请输入经营活动现金流出', trigger: 'change'  },
            {  validator: validateNum, trigger: 'change' }
        ],
      },
      statusDesc:'',
      rules4:{

      }
    }
  },
  components: {
    'menu-top':() => import('../../common/Menu-Top'),
    'menu-left':() => import('../../common/Menu-Left'),
    "rotate-message": () => import("../../common/rotate-message")
  },  
  created(){
      this.id = this.$router.currentRoute.query.id;
  },
  mounted(){
      let sessionId = common.getCookie('sessionId');
      this.upLoadUrl =CONSTANT.URL.BASE.ADMINUPLOAD+ '?sessionId='+sessionId;
      this.getYearList()
  },
  methods:{
    editBtn(){
        this.editState = true
    },
    addFinance(){
        this.form = {
            excelFileId: '',
            rptQuarter: '',
            rptYear: '' 
        }
        this.dialogFormVisible = true;
    },
    confrimBtn(formName){
        this.$refs[formName].validate((valid) => {
            if (valid) {
                let url = CONSTANT.URL.SYSTEM.SAVEUSERFINACE;
                let param = JSON.stringify(this.form);
                common.requestAjax(url, param, null, res => {
                    if(res.status == 200) {
                        this.$message({
                            type: 'success',
                            message: '保存成功!'
                        });
                        this.dialogFormVisible = false;
                        this.getYearList()
                    } else {
                        this.$message({
                            type: 'error',
                            message: res.msg
                        });
                    }
                });
            } else {
                return false;
            }
            });
    },
    confrimBtn1(formName){
        this.information.financeId = this.financeId;
        this.$refs[formName].validate((valid) => {
            if (valid) {
                let url = CONSTANT.URL.SYSTEM.SAVEFINANCEBALANCESHEET;
                let param = JSON.stringify(this.information);
                common.requestAjax(url, param, null, res => {
                    if(res.status == 200) {
                        this.$message({
                            type: 'success',
                            message: '保存成功!'
                        });
                        this.getFinance()
                        this.editState = false;
                    } else {
                        this.$message({
                            type: 'error',
                            message: res.msg
                        });
                    }
                });
            } else {
                return false;
            }
            });
    },
    confrimBtn2(formName){
        this.information1.financeId = this.financeId;
        this.$refs[formName].validate((valid) => {
            if (valid) {
                let url = CONSTANT.URL.SYSTEM.SAVEUSERFINANCEPROFIT;
                let param = JSON.stringify(this.information1);
                common.requestAjax(url, param, null, res => {
                    if(res.status == 200) {
                        this.$message({
                            type: 'success',
                            message: '保存成功!'
                        });
                        this.getFinance()
                        this.editState = false;
                    } else {
                        this.$message({
                            type: 'error',
                            message: res.msg
                        });
                    }
                });
            } else {
                return false;
            }
            });
    },
    confrimBtn3(formName){
        this.information2.financeId = this.financeId;
        this.$refs[formName].validate((valid) => {
            if (valid) {
                let url = CONSTANT.URL.SYSTEM.SAVEUSERFINANCECASHFLOW;
                let param = JSON.stringify(this.information2);
                common.requestAjax(url, param, null, res => {
                    if(res.status == 200) {
                        this.$message({
                            type: 'success',
                            message: '保存成功!'
                        });
                        this.getFinance()
                        this.editState = false;
                    } else {
                        this.$message({
                            type: 'error',
                            message: res.msg
                        });
                    }
                });
            } else {
                return false;
            }
            });
    },
    retunStr(num){
       let arr =  ['','第一季度','第二季度','第三季度','第四季度'];
       return arr[num]
    },
    typeBtn(num){
        this.editState = false
        this.tableType = num+1;
    },
    yearSelect(num){
        this.yearIndex = num;
        this.rptIndex = 0;
        this.financeId = this.yearArr[num].financeDatas[0].id;
        this.projectDate = this.yearArr[num].financeDatas[0].gmtCreated;
        this.statusDesc = this.yearArr[num].financeDatas[0].auditStatusDesc;
        this.editState = false
        this.getFinance()
    },
    regClick(num,id){
        this.rptIndex = num;
        this.financeId = id;
        this.projectDate = this.yearArr[this.yearIndex].financeDatas[num].gmtCreated;
        this.editState = false
        this.getFinance()
    },
    getFinance(){
        let api;
            if(this.id){
                api = CONSTANT.URL.CHANNEL.FINDFINANCEDETAIL
            }else{
                api = CONSTANT.URL.SYSTEM.FINDUSERFINANCEDETAIL
            }
            let  url = api,
            data = {},
            dataForm = {financeId:this.financeId}
            common.requestAjax(url,JSON.stringify(data),dataForm,(res)=>{
            if(res.status == 200){
                let obj ={
                    financeId:'',
                    currentAssets:'',
                    bankCash:'',
                    currentInvestment:'',
                    notesReceivable:'',
                    accountReceivable:'',
                    otherReceivable:'',
                    prepayment:'',
                    inventory:'',
                    otherAssets:'',
                    longtermInvestment:'',
                    netBal:'',
                    constructionInprogress:'',
                    intangibleAssets:'',
                    longtermDeferredExpense:'',
                    totalCurrentLiability:'',
                    shorttermLoans:'',
                    notesPayable:'',
                    advanceFromCustomers:'',
                    accountsPayable:'',
                    taxesPayable:'',
                    otherPayable:'',
                    otherCurrentLiability:'',
                    totalLongtermLiability:'',
                    longtermLoans:"",
                    netBa:'',
                    capitalReserves:'',
                    surplusReserves:'',
                    retainedProfits:''
                },
                obj1 = {
                    revenue:'',
                    salesCost :'',
                    grossProfit:'',
                    otherProfit:'',
                    operatingExpense:'',
                    adminExpense:'',
                    financeExpense:'',
                    interestExpense:'',
                    investmentIncome:'',
                    operationProfit:'',
                    nonOperationIncome:'',
                    nonOperationExpense:'',
                    beforeTaxProfit:'',
                    netProfit:''
                },
                obj2 = {
                    financingInflowsCash: '',
                    financingNetFlows:'',
                    financingOutflowsCash: '',
                    investInflowsCash: '',
                    investNetFlows: '',
                    investOutflowsCash:'',
                    runInflowsCash: '',
                    runNetFlows: '',
                    runOutflowsCash: ''
                }

                this.info= res.data.bussData;
                this.fileName = this.info.financeData&&this.info.financeData.excelFileInfo?this.info.financeData.excelFileInfo.fileName:''
                this.information = this.info.balanceSheetData?this.info.balanceSheetData:obj
                this.information1 = this.info.profitSheetData?this.info.profitSheetData:obj1
                this.information2 = this.info.cashflowData?this.info.cashflowData:obj2
            }else{
            
            }
        })
    },
    getYearList(){
        let api;
            if(this.id){
                api = CONSTANT.URL.CHANNEL.FINDFINANCEYEARLIST
            }else{
                api =CONSTANT.URL.SYSTEM.FINDFINANCEYEARLIST
            }
            let  url = api,
            data = {},
            dataForm = {userId:this.id}
            common.requestAjax(url,JSON.stringify(data),dataForm,(res)=>{
            if(res.status == 200){
                this.yearArr= res.data.bussData
                if(this.yearArr.length){
                    this.financeId = this.yearArr[0].financeDatas[0].id
                    this.projectDate = this.yearArr[0].financeDatas[0].gmtCreated;
                    this.statusDesc = this.yearArr[0].financeDatas[0].auditStatusDesc;
                }else{
                    this.financeId = ''
                }
                this.getFinance()
            }else{
            
            }
        })
    },
    handleRemove(file, fileList) {      // 图片上传
        this.form.excelFileId = '';
    },       
    handleFileSuccess(res, file) {
            if(res.status == 200){
                let picItem = res.data.bussData;
                this.form.excelFileId = picItem.fileId;
                this.fileName = picItem.fileName;
            }
    },
  },
  watch: {  
      $route(to, from) {  
        // this.$refs.left.activePath()
      }  
  }
}
</script>

<style  lang="scss">
body{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
}

.content{
  min-height: 100%;
  background-color: #f5f5f5;
  width: 81.3%;
  float: right;
}

.content-wrap{
  overflow: hidden;
}

.financial-wrap{
  padding-top: 29px;
  .el-button--primary{
        border-radius: 4px;
        -webkit-border-radius: 4px;
        background-color: #ED7018;
        border: 0PX;
        &:hover{
            background-color: #ED9000;
            transition:all .2s linear
        } 
  }
  .upload-demo{
      .btn{
            display: inline-block;
            width: 80px;
            height: 30px;
            margin-left: 0px;
            background-color: #ED7018;
            border-radius: 4px;
            -webkit-border-radius: 4px;
            font-size: 14px;
            color: #fff;
            text-align: center;
            line-height: 30px;
            margin-right: 11px;
            cursor: pointer;
            &:hover{
                background-color: #ED9000;
                transition:all .2s linear
            } 
        }
  }
        .file-name{
            font-size: 16px;
            color: #666;
        }
  .wrap{
    background-color: #f5f5f5;
    .title-head{
      height: 50px;
      line-height: 50px;
      background-color: #fff;
      margin-top: 18px;
      padding-left: 20px;
      font-size: 14px;
      color: #666;
      span{
        color: #0087DC;
        cursor: pointer;
      }
    }
    .wrap-container{
      padding: 11px 60px 33px 29px;
      background-color: #fff;
      margin-top: 20px;
      .title{
        padding-bottom: 18px;
        padding-top: 10px;
        span{
            color: #111;
            font-weight: bold;
        }
        .btn{
            display: inline-block;
            width: 128px;
            height: 40px;
            margin-left: 41px;
            background-color: #ED7018;
            border-radius: 4px;
            -webkit-border-radius: 4px;
            font-size: 14px;
            color: #fff;
            text-align: center;
            line-height: 40px;
            cursor: pointer;
            &:hover{
                background-color: #ED9000;
                transition:all .2s linear
            } 
        }
      }
      .table-wrap{
          overflow: hidden;
          font-size: 14px;
          border: 1px solid #e1e1e1;
          height: 1484px;
          box-sizing: border-box;
          .el-form-item__error{
              display: none;
          }
          &.edit{
            height: 2050px;
            .el-form-item__error{
                display: block;
            }
            .desc{
                margin-bottom: 0!important;
                &.num{
                    left: 0!important;
                }
                span{
                    display: inline-block;
                    width: 200px;
                    text-align: right;
                }
            }
            .name-title{
                margin-bottom: 10px!important;
            }
            .second{
                .desc{
                    padding-left: 0!important;
                }
            }
            .el-button{
                margin-left: 20%;
            }
            .el-form-item__error {
                top: 69%;
                left: 180px;
            }
          }
          .table-title{
              width: 100%;
              height: 70px;
              line-height: 70px;
              font-size: 16px;
          }
          .table-year{
              float: left;
              display: inline-block;
              width: 7%;
              text-align: center;
              height: 100%;
              .table-title{
                  border-right: 1px solid #e1e1e1;
                  border-bottom: 1px solid #e1e1e1;
              }
          }
          .table-month{
              float: left;
              width: 7%;
              text-align: center;
              height: 100%;
              .table-title{
                  border-right: 1px solid #e1e1e1;
                  border-bottom: 1px solid #e1e1e1;
              }
          }
          .table-detail{
              width: 84%;
              float: left;
              .table-title{
                  overflow: hidden;
                  width: 101%;
                  padding-left: 2%;
                  border-bottom: 1px solid #e1e1e1;
                  .tab-item{
                      float: left;
                      overflow: hidden;
                      width: 30.6%;
                      font-size: 16px;
                      .tab-list{
                          text-align: center;
                          width: 33.33%;
                          float: left;
                          text-align: center;
                          cursor: pointer;
                          color: #666666;
                          &.active{
                              color: #ED9000;
                          }
                          &:hover{
                              color: #323232;
                          }
                      }
                  }
                  .date{
                      float: left;
                      margin-left: 16%;
                      span{
                          color: #999;
                      }
                  }
                  .state{
                      float: left;
                      margin-left: 10%;
                      span{
                          color: #999;
                      }
                  }
                  .change{
                      float: right;
                      cursor: pointer;
                      color: #ED7018;
                      margin-right: 2.5%;
                  }
              }
              .table-file{
                  overflow: hidden;
                  width: 101%;
                  padding-left: 2%;
                  height: 70px;
                  line-height: 70px;
                  border-bottom: 1px solid #e1e1e1;
                 .upload-demo{
                    float: left;
                    margin-left: 1%;
                 }
                 .name{
                     float: left;
                 }
              }
              .table-menu{
                  position: relative;
                  width: 101%;
                  padding-left: 2%;
                  padding-top: 19px;
                  .menu-title{
                      font-size: 16px;
                      color: #111;
                      font-weight: bold;
                      margin-bottom: 20px;
                  }
                  .el-form-item {
                      margin-bottom: 0;
                      .el-form-item__content{
                          line-height: inherit;
                      }
                  }
                  .name-title{
                      font-size: 14px;
                      color: #111;
                      margin-bottom: 23px;
                      font-weight: bold;
                  }
                  .second{
                      .desc{
                          padding-left: 20px;
                      }
                  }
                  .desc{
                      font-size: 14px;
                      color: #111;
                      margin-bottom: 20px;
                    //   font-weight: bold;
                      padding-left: 0px;
                      .el-input{
                          margin-bottom: 20px;
                      }
                      .tip{
                          display: inline-block;
                      }
                      &.num{
                          position: relative;
                          left: -20px;
                      }
                      span{
                          font-weight: normal;
                          color: #666;
                      }
                  }
                  .btn{
                        position: absolute;
                        right: 2%;
                        top: 19px;
                        width: 80px;
                        height: 30px;
                        background-color: #6C6C6C;
                        border-radius: 4px;
                        -webkit-border-radius: 4px;
                        font-size: 16px;
                        color: #fff;
                        text-align: center;
                        line-height: 30px;
                        cursor: pointer;
                        &:hover{
                            background-color: #777;
                            transition:all .2s linear
                        } 
                    }
              }
          }
          .table-item{
              border-right: 1px solid #e1e1e1;
              height: 100%;
              .table-list{
                  height: 44px;
                  line-height: 44px;
                  text-align: center;
                  cursor: pointer;
                  &.active{
                      color: #ED7018;
                  }
                  &:hover{
                      color: #ED7018;
                  }
              }
          }
      }

    }
  }
  .el-dialog__body{
      .el-input{
          width: 300px;
      }
  }
}

a{
  text-decoration: none;
}
</style>